tblTargetCountSingleTarget = {
	"Training Bag",
	"Training Dummy",
	"Raider's Training Dummy",
	"Headless Horseman",
	"Head of the Horseman",
	"Master Snowdrift",
	"Kuai The Brute",
	"Azure Serpent",
	"Gu Cloudstrike",
	"Master Snowdrift",
}
function ccrTargetCount(yards)
	local vMobCount 
	if yards == nil then yards = 12 end;
	if (vLastTargetCountScan == nil or (GetTime()-vLastTargetCountScan) > 0.10)
	then
		vMobCount = 0
		for i = 0, # tblPGetNearbyEnemies do
			local tblObj = tblPGetNearbyEnemies[i]
			if tblObj ~= nil
			and tblObj:Exists()
			and Target and Target:Exists() and not Target:IsDead()
			and tblObj:GetDistance(Target) <= yards + tblObj:GetCombatReach()
			and not tblObj:IsDead()
			and Player:CanAttack(tblObj)
			then
				vMobCount = vMobCount + 1
			end
		end
		if vMobCount == nil then vMobCount = 0 end;
		if tContains(tblTargetCountSingleTarget, ccrTargetName()) then vMobCount = 1 end;
		vLastTargetCountScan = GetTime()
		vLastTargetCount = vMobCount
	else
		if vLastTargetCount ~= nil then return vLastTargetCount end;
	end

	if vMobCount ~= nil then return vMobCount end;
end

function ccrPlayerCount(yards)
	local vMobCount
	if yards == nil then yards = 12 end
	if (vLastPlayerCountScan == nil or (GetTime()-vLastPlayerCountScan) > 0.10)
	then
		vMobCount = 0
		for i = 0, # tblPGetNearbyEnemies do
			local tblObj = tblPGetNearbyEnemies[i]
			if tblObj ~= nil
			and tblObj:Exists()
			and tblObj:GetDistance(Player) <= yards + tblObj:GetCombatReach()
			and not tblObj:IsDead()
			and Player:CanAttack(tblObj)
			then
				vMobCount = vMobCount + 1
			end
		end
		if tContains(tblTargetCountSingleTarget, ccrTargetName()) then vMobCount = 1 end;
		vLastPlayerCountScan = GetTime()
		vLastPlayerCount = vMobCount
	else
		if vLastPlayerCount ~= nil then return vLastPlayerCount end;
	end

	if vMobCount ~= nil then return vMobCount end;
end

function ccR_HostilesNearPlayer(yards)
	if yards == nil then yards = 8 end
	local x
	local vHostileNearPlayerCount = 0
	table.empty(tblPGetMeleeEnemies)
	if # tblPGetNearbyEnemies > 0 then
		for x = 1, # tblPGetNearbyEnemies do
			local obj = tblPGetNearbyEnemies[x]
			if obj
			and obj:Exists()
			and not obj:IsDead()
			and obj:GetDistance(Player) <= yards
			then
				vHostileNearPlayerCount = vHostileNearPlayerCount + 1
			end
		end
	end
	return vHostileNearPlayerCount
end